#include <stdio.h>

int main(int argc, char *argv[]) {

    int num = 0, max = -999;

    while (scanf("%d",&num)!=EOF)
    {
        if(num==-1)
            break;
        if(num>max)
            max = num;
    }

    printf("%d", max);

    return 0;
}